<template lang="pug">
el-aside(style="width:auto")
	el-menu.el-menu-vertical-demo(@open="handleOpen" @close="handleClose" background-color="#3D3D3D"
	text-color="#fff" active-text-color="#20a0ff" unique-opened :collapse="isCollapse" v-if="shiroitem.admin||shiroitem.manager||shiroitem.kefu")
		el-menu-item(index="0" @click="to('/Index')")
			i.el-icon-tickets
			span(slot="title") 首页
		el-submenu(index="2")
			template(slot="title")
				i.el-icon-goods
				span 商品管理
			el-menu-item-group
				el-menu-item(index="2-1" @click="to('/GoodList')") 商品列表
				el-menu-item(index="2-2" @click="to('/GoodPush')" v-if="shiro") 商品发布
				el-menu-item(index="2-3" @click="to('/GoodKind')" v-if="shiro") 商品类型管理
		el-submenu(index="7")
			template(slot="title")
				i.el-icon-document
				span 进销存
			el-menu-item-group
				el-menu-item(index="7-5" @click="to('/Booking')") 订货
				el-menu-item(index="7-1" @click="to('/PutInStorage')") 入库
				el-menu-item(index="7-2" @click="to('/TransferCargo')") 调货
				el-menu-item(index="7-3" @click="to('/Inventory')") 盘点
				el-menu-item(index="7-4" @click="to('/ReportedLoss')") 报损
				el-menu-item(index="7-6" @click="to('/Sales')") 销售
		el-submenu(index="6")
			template(slot="title")
				i.el-icon-setting
				span 界面配置
			el-menu-item-group
				el-menu-item(index="6-1" @click="to('/WxConfig/wxw')") 微信商城
				el-menu-item(index="6-2" @click="to('/WxConfig/xcxt')") 小程序
		el-menu-item(index="3" @click="to('/OrderList')")
			i.el-icon-tickets
			span(slot="title") 订单管理
		el-menu-item(index="4" @click="to('/ShopConfig')" v-if="shiro")
			i.el-icon-location
			span(slot="title") 门店管理
		el-menu-item(index="5" @click="to('/CustomerList')")
			i.el-icon-service
			span(slot="title") 客户查询
		el-submenu(index="9" v-if="shiro")
			template(slot="title")
				i.el-icon-phone-outline
				span 营销
			el-menu-item-group
				el-menu-item(index="9-1" @click="to('/CouList')") 优惠券管理
				el-menu-item(index="9-2" @click="to('/CouTime')") 限时抢购
				el-menu-item(index="9-3" @click="to('/CouShare')") 分享活动
				el-menu-item(index="9-4" @click="to('/CouLimit')") 限时抢劵
				el-menu-item(index="9-5" @click="to('/FindCode')") 编码查询
				el-menu-item(index="9-6" @click="to('/PayConfig')") 充值配置
		el-submenu(index="1")
			template(slot="title")
				i.el-icon-menu
				span 经营分析
			el-menu-item-group
				el-menu-item(index="1-1" @click="to('/Home')") 门店分析
				el-menu-item(index="1-2" @click="to('/Sales')") 商品分析
	el-menu.el-menu-vertical-demo(@open="handleOpen" @close="handleClose" background-color="#3D3D3D"
	text-color="#fff" active-text-color="#20a0ff" unique-opened :collapse="isCollapse" v-if="shiroitem.caiwu")
		el-menu-item(index="3" @click="to('/OrderList')")
			i.el-icon-tickets
			span(slot="title") 订单管理
		el-menu-item(index="5" @click="to('/CustomerList')")
			i.el-icon-service
			span(slot="title") 客户查询
</template>

<script>
import lockr from 'lockr'
import qs from 'qs'
import axios from 'axios'
import 'font-awesome/css/font-awesome.css'
	export default{
		props: ["isCollapse"],
		data(){
			return{
				shiro:this.$store.state.shiro,
				shiroitem:this.$store.state.shiroitem
			}
		},
		computed:{

		},
		mounted(){
			// console.log(this.shiro,this.shiroitem)
		},
		methods:{
			handleOpen(key, keyPath) {
				
			},
			handleClose(key, keyPath) {
				
			},
			to(path){
				router.push(path);
			}
		},
		created(){
			
		}
	}
</script>
<style scoped>
.el-menu{
	border-right: none;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 225px;
}
</style>